<div id="file_manager">
	<?php if($msg['content']!='') :?>
	<p class="<?php echo $msg['type']; ?>_msg"><?php echo $msg['content']; ?></p>
	<?php endif; ?>
	<div id="tbar" class="clearfix">
	<?php if(is_array($upper_dirs) && count($upper_dirs)): ?>
	<dl id="current_path">
		<dt>You are here: </dt>
		<dd>			
			<ul>
				<?php for($i=0;$i<count($upper_dirs);$i++): ?>
				<li>
				<?php if($i==count($upper_dirs)-1): ?>
					<?php echo $upper_dirs[$i]['dir_name']; ?>
				<?php else: ?>				
					<a href="<?php echo SITE_URL; ?>index.php/file_manager/index/path:<?php echo base64_encode($upper_dirs[$i]['dir_path']); ?>">
					<?php echo $upper_dirs[$i]['dir_name']; ?>
					</a>/
				
				<?php endif; ?>
				</li>
				<?php endfor; ?>
			</ul>
		</dd>
	</dl>
	<?php endif; ?>
	</div><!-- end FILE MANAGER::TOP BAR -->
	<div id="side_panel" class="clearfix">
		<div id="places">
			<h2>Places</h2>
			<div id="places_tbar" class="clearfix">
				<ul>
					<li class="btn" id="create_folder_btn">Create Folder</li>
					<li class="btn" id="remove_folder_btn">Remove Folder</li>
				</ul>
				<div id="create_folder">
					<form action="<?php echo SITE_URL; ?>index.php/file_manager/createFolder" method="post" enctype="multipart/form-data">				
						<label>Folder name:</label>
						<input type="text" name="dirname" size="15" />
						<input type="hidden" name="form-upload" />
						<input type="submit" value="Create" name="submit-create" />
					</form>
				</div>
			</div>
			<div id="places_content">
				<form action="<?php echo SITE_URL; ?>index.php/file_manager/removeDirs" method="post" id="folders_form">
				<?php if(is_array($places) && count($places)): ?>	
				<?php if($parent_path): ?>
				<a href="<?php echo SITE_URL; ?>index.php/file_manager/index/path:<?php echo base64_encode($parent_path); ?>">&lt; parent</a>			
				<?php endif; ?>
				<ul>
					<?php for($i=0;$i<count($places);$i++): ?>
					<li>
					<input type="checkbox" name="remove_dir[]" value="<?php echo $places[$i]['dir_name']; ?>" />
					<a href="<?php echo SITE_URL; ?>index.php/file_manager/index/path:<?php echo base64_encode(ltrim($places[$i]['dir_path'],ROOT_DIR)); ?>">
					<?php echo $places[$i]['dir_name']; ?>
					</a>
					</li>
					<?php endfor; ?>
				</ul>				
				<?php else :?>
				no subdirectories
				<?php endif; ?>
				</form>
			</div>
		</div><!-- end SIDE PANEL::PLACES -->
		<div id="preview">
			<h2>Preview</h2>
			<div id="preview_tbar" class="clearfix">&nbsp;</div>
			<div id="preview_content">
				<div class="file_wrapper">
					<img src="<?php echo SITE_URL; ?>files/no_preview.gif" id="preview_file" />
					<span>file description here</span>
				</div>
			</div>
		</div><!-- end SIDE PANEL::PREVIEW -->
	</div><!-- end SIDE PANEL -->
	<div id="files" class="clearfix">
		<h2>Files</h2>
		<div id="files_tbar" class="clearfix">
			<ul class="clearfix">
				<li class="btn" id="upload_file_btn">Upload File</li>
				<li class="btn" id="remove_file_btn">Remove File</li>
			</ul>
		
			<div id="upload_file">
				<form action="<?php echo SITE_URL; ?>index.php/file_manager/uploadFile" method="post" enctype="multipart/form-data">
					<label>Select File:</label>
					<input type="file" name="file" size="25" />
					<label>Rename To:</label>
					<input type="text" name="rename_to" size="15" />
					<input type="hidden" name="form-upload" />
					<input type="submit" value="Upload" name="submit-upload" />
				</form>
			</div>
		</div>		
		<form action="<?php echo SITE_URL; ?>index.php/file_manager/removeFiles" method="post" id="files_form">
			<div id="files_content" class="clearfix">
				<?php if(is_array($files) && count($files)) :?>
				<?php for($i=0;$i<count($files);$i++) :?>
				<?php $class=($i==0)? 'file_wrapper selected_file': 'file_wrapper'; ?>
				<div class="<?php echo $class; ?>">
					<?php if($files[$i]['file_thumb']!=null): ?>
					<img src="<?php echo SITE_URL; ?><?php echo ltrim($files[$i]['file_thumb'],ROOT_DIR); ?>" alt="<?php echo $files[$i]['file_name']; ?>" />
					<?php else :?>
					<img src="<?php echo SITE_URL; ?>files/no_preview.gif" alt="<?php echo $files[$i]['file_name']; ?>" />
					<?php endif; ?>
					<span><?php echo $files[$i]['file_name']; ?></span><br />
					<label>Remove: </label><input type="checkbox" name="remove_file[]" value="<?php echo $files[$i]['file_name']; ?>" />
				</div>
				<?php endfor; ?>
				<?php else :?>
				no files
				<?php endif; ?>			
			</div>
		</form>
	</div><!-- end FILE MANAGER::FILES -->
	<div id="bbar" class="clearfix">
	bottom bar
	</div><!-- end FILE MANAGER::TOP BAR -->

</div><!-- end FILE MANAGER -->
